﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;

namespace HWEngine
{
	public class RtfTextStyle
	{
		public float FontSize = 10.0f;
		public float LineWidth = 1.0f;
		public Color Color = System.Drawing.Color.Black;
		public string FontName { get; set; }

		public RtfTextStyle()
		{
		}

		public RtfTextStyle(float FontSize, float LineWidth, Color Color, string FontName)
		{
			this.FontSize = FontSize;
			this.LineWidth = LineWidth;
			this.Color = Color;
			this.FontName = FontName;
		}

		public override string ToString()
		{
			return String.Format("font={0}, linewidth={1}, color={2}, fontName={3}", FontSize, LineWidth, Color, FontName);
		}

		public RtfTextStyle Clone()
		{
			return new RtfTextStyle(FontSize, LineWidth, Color, FontName);
		}

		public override bool Equals(object obj)
		{
			if (obj != null && obj is RtfTextStyle)
			{
				RtfTextStyle o = (RtfTextStyle)obj;
				return o.FontSize == FontSize && o.Color == Color && o.LineWidth == LineWidth && o.FontName == FontName;
			}
			else
			{
				return base.Equals(obj);
			}
		}
	}
}
